<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.encuestame</groupId>
        <artifactId>web-app</artifactId>
        <version>1.5.1-SNAPSHOT</version>
    </parent>
    <artifactId>enme-jetty-app</artifactId>
    <packaging>war</packaging>
    <name>Encuestame Jetty WAR Webapp</name>
    <build>
        <finalName>encuestame_jetty</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>${maven.war.plugin}</version>
            </plugin>
            <plugin>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-maven-plugin</artifactId>
                <version>${jetty-plugin-version}</version>
                <configuration>
                    <systemProperties>
                        <systemProperty>
                            <name>encuestame.custom.config</name>
                            <value>${encuestame.local.properties}</value>
                        </systemProperty>
                    </systemProperties>
                    <connectors>
                        <connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
                            <port>${jetty.default.port}</port>
                        </connector>
                    </connectors>
                    <webAppConfig>
                        <contextPath>/encuestame</contextPath>
                        <baseResource implementation="org.eclipse.jetty.util.resource.ResourceCollection">
                            <resourcesAsCSV>src/main/webapp,../../enme-views/src/main/webapp,
                                ../../../enme-js/resources-enme-war/src/main/resources,
                                ../../../enme-css/src/main/webapp</resourcesAsCSV>
                        </baseResource>
                        <!-- http://stackoverflow.com/questions/5802096/duplicate-fragment-name-error-jetty-maven-plugin -->
                        <allowDuplicateFragmentNames>true</allowDuplicateFragmentNames>
                    </webAppConfig>
                    <scanIntervalSeconds>0</scanIntervalSeconds>
                </configuration>
            </plugin>
        </plugins>

        <resources>
            <resource>
                <directory>src/main/resources/</directory>
                <includes>
                    <include>*.*</include>
                </includes>
                <filtering>true</filtering>
            </resource>
        </resources>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.encuestame</groupId>
            <artifactId>enme-config</artifactId>
            <version>${project.version}</version>
            <type>war</type>
        </dependency>
        <dependency>
            <groupId>org.encuestame</groupId>
            <artifactId>enme-views</artifactId>
            <version>${project.version}</version>
            <type>war</type>
        </dependency>
        <dependency>
            <groupId>org.encuestame</groupId>
            <artifactId>encuestame-business</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.javascript</groupId>
            <artifactId>closure-compiler</artifactId>
            <version>v20141120</version>
        </dependency>
    </dependencies>

</project>
